<table id="cbg" class="layui-table site-table table-hover" width="100%" lay-skin="line" >
        <thead>
          <tr>
            <th>内容</th>
            <th>发表时间</th>
            <th>显示状态</th>
            <th>商家回复</th>
          </tr>
        </thead>
</table>

<script>
var table;
$(function(){
	
	table = $('#cbg').DataTable({
		"language": {
	        "url": "${staticserver}/media/zh_CN.txt"
	    },
	    "processing": true,
	    "serverSide": true,
	    "ordering": false,
	    "searching": false,
	    "lengthChange": false,
	    ajax: {
	        //指定数据源
	        type:"post",
	        url: '${ctx}/shop/admin/comments/list-json-by-member.do?member_id=${member_id}&type=2',
	    },
	    columns: [
			{data:null,"render":function(data,type,row){
				if(data.content==""){
					return "";
				}else{
				return data.content;
				}
			}},      
			{data:null,"render":function(data,type,row) {
				if(data.dateline==null){
					return " ";
				}else{
					return  getFormatDateByLong(data.dateline, "yyyy-MM-dd");
				}
			}},      
			{data: null,"render":function(data,type,row){
				if(data.status==0){
					return "待审核";
				}else if(data.status==1){
					return "审核通过";
				}else if(data.status==2){
					return "审核拒绝";
				}
			}},
			{data: null,"render":function(data,type,row) {
				if(data.reply==null){
					return"商家未回复";
				}else {
					return"商家已回复";
				}
			}}
	     ]
	});
});

</script>


